package com.jspgou.cms.action.front;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jspgou.common.web.ResponseUtils;
import com.jspgou.core.manager.UserMng;

@Controller
public class UserAct {
//	@RequestMapping("/user/check_username.jspx")
//	public String checkUsername(String username, HttpServletRequest request,
//			HttpServletResponse response) {
//		if (StringUtils.isBlank(username) || userMng.usernameExist(username)) {
//			ResponseUtils.renderJson(response, "false");
//		} else {
//			ResponseUtils.renderJson(response, "true");
//		}
//		return null;
//	}
//
//	@RequestMapping("/user/check_email.jspx")
//	public String checkEmail(String email, HttpServletRequest request,
//			HttpServletResponse response) {
//		if (StringUtils.isBlank(email) || userMng.emailExist(email)) {
//			ResponseUtils.renderJson(response, "false");
//		} else {
//			ResponseUtils.renderJson(response, "true");
//		}
//		return null;
//	}

	@Autowired
	private UserMng userMng;
}
